package com.ruoyi.car.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.car.mapper.CarDoorMapper;
import com.ruoyi.car.domain.CarDoor;
import com.ruoyi.car.service.ICarDoorService;
import com.ruoyi.common.core.text.Convert;

/**
 * 车辆门Service业务层处理
 * 
 * @author zls
 * @date 2020-03-29
 */
@Service
public class CarDoorServiceImpl implements ICarDoorService 
{
    @Autowired
    private CarDoorMapper carDoorMapper;

    /**
     * 查询车辆门
     * 
     * @param id 车辆门ID
     * @return 车辆门
     */
    @Override
    public CarDoor selectCarDoorById(Long id)
    {
        return carDoorMapper.selectCarDoorById(id);
    }

    /**
     * 查询车辆门列表
     * 
     * @param carDoor 车辆门
     * @return 车辆门
     */
    @Override
    public List<CarDoor> selectCarDoorList(CarDoor carDoor)
    {
        return carDoorMapper.selectCarDoorList(carDoor);
    }

    /**
     * 新增车辆门
     * 
     * @param carDoor 车辆门
     * @return 结果
     */
    @Override
    public int insertCarDoor(CarDoor carDoor)
    {
        return carDoorMapper.insertCarDoor(carDoor);
    }

    /**
     * 修改车辆门
     * 
     * @param carDoor 车辆门
     * @return 结果
     */
    @Override
    public int updateCarDoor(CarDoor carDoor)
    {
        return carDoorMapper.updateCarDoor(carDoor);
    }

    /**
     * 删除车辆门对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCarDoorByIds(String ids)
    {
        return carDoorMapper.deleteCarDoorByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除车辆门信息
     * 
     * @param id 车辆门ID
     * @return 结果
     */
    @Override
    public int deleteCarDoorById(Long id)
    {
        return carDoorMapper.deleteCarDoorById(id);
    }
}
